# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=vvmd
pkgver=0.18
pkgrel=0
pkgdesc="lower level daemon that retrieves Visual Voicemail"
url="https://gitlab.com/kop316/vvmd"
arch="all"
license="GPL-2.0-only"
depends="mobile-broadband-provider-info"
makedepends="
	curl-dev
	dbus-dev
	glib-dev
	libphonenumber-dev
	meson
	modemmanager-dev
	"
source="https://gitlab.com/kop316/vvmd/-/archive/$pkgver/vvmd-$pkgver.tar.gz
	vvmd.desktop
	remove-debug-lines.patch
	"

case "$CARCH" in
x86)
	# fail for some reason
	options="$options !check"
	;;
esac

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	install -Dm644 "$srcdir"/vvmd.desktop -t \
		"$pkgdir"/etc/xdg/autostart
}

sha512sums="
8aae22625aabc402631d1526819cf9e120f1a8e5db402b282dd6db59ba18274fda23fe1a8d7da9d6a77f76ed296a810de21e2dc568d023ca93507c95017d9d02  vvmd-0.18.tar.gz
211400663af11dd0c0eab9b6f40c0ccee349bf64cf232749bcd74d0cbf52d3d68197c0ab2ec5ef7dd718537de4d7cdc0af3e4ee038d569ba1a5bfac7c3d68cae  vvmd.desktop
d764aeb3b9da9beab04c83241d915d043ea830474a40e9c5c50a89eb3012a181cd1790294c99e416ea0605456e43fe489c62a827b1195932ec7abaf385905e02  remove-debug-lines.patch
"
